package com.amc.framework.config;

import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ZhangXX
 * @version 1.0
 * @data 2021/5/19 23:03
 */
@Configuration
public class MeterRegistryConfig {

	@Bean
	public MeterRegistryCustomizer<MeterRegistry> configurer(@Value("${spring.application.name}") String application) {
		return (registry) -> registry.config().commonTags("application", application);
	}

}
